package com.jwd.avmanager.mapper;


import com.jwd.avmanager.entity.Audiostaffdevic;
import com.jwd.avmanager.entity.SysDoc;
import com.jwd.avmanager.pojo.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface LoginMapper {
    List<Audiostaffdevic> getAudioDevic(@Param("AudioId") Integer AudioId);
    boolean setFile(SysDoc sysDoc);
    Integer getFileCount(@Param("fileName") String fileName);
    FtpServer getFtpServer(@Param("id") Integer id);
    //开始登录
    void terminalLoginProc(TerminalLogin terminalLogin); //函数初始
    TerminalLogin getloginProc(@Param("dvNum") String dvNum);
    boolean UploginDevic(TerminalLogin terminalLogin);
    boolean UploginUserInfo(TerminalLogin terminalLogin);
    boolean InDevicLogin(TerminalLogin terminalLogin);

    //结束登录
    void terminalUnLogin(TerminalUnLogin terminalUnLogin); //函数初始
    LogQuitVrify  NologVrify(@Param("uDvId") int uDvId);
    boolean UpNologDevic(TerminalUnLogin terminalUnLogin);
    boolean UpNologUserInfo(TerminalUnLogin terminalUnLogin);
    boolean InDevicNoLog(TerminalUnLogin terminalUnLogin);

    Login getlogin(@Param("user") String user, @Param("pwd") String pwd);
    Users getUsers(@Param("uDvId") int uDvId);
    Users getUser(@Param("uId") int uId);
    List<Group> getgroup(@Param("uDvId") int uDvId);
    List<Group> getgroupLog(@Param("groupId") int groupId);
    List<GUser> getuserList (@Param("uDvId") int uDvId);
    List<GUser> getGUList (@Param("uDvId") int uDvId);
    void alterState(@Param("uSupportVideo") int uSupportVideo, @Param("uDvId") int uDvId,@Param("IMEI") String IMEI);

    void insGPS(Gps gpsSeva);           //函数初始
    Integer getUserID(@Param("devId")int uDvId);
    Integer getDevicUseID(GpsMes gpsMes);
    boolean setDevicUse(GpsMes gpsMes);
    boolean setSysGPS(GpsV2 gpsSeva);

    void getWedRTC(WebRtc wedRtc);      //函数初始
    WebRtcUserInfo getWedRTCUserInfo(@Param("uID") int uId);
    List<WebRtcAudioTalkStatus> getWedRTCATS(@Param("uID") int uId);    //查询通话状态
    Integer getWedRTCSDepartment(@Param("depID") int depID);            //查询是否是群组
    Integer getWedRTCAudioGroup(@Param("audioGroupID") int audioGroupID);   //群组的状态
    Integer getWedRTCAudioTalkStatus(@Param("audioGroupID") int audioGroupID,@Param("uId") int uId);    //其他房间
    Integer setWedRTCAudioGroup(WedRTCAudioGroup wedRTCAudioGroup); //添加临时组


    /**
     * sql
     * @param sosSave
     */
    void getSosSave(SOSSave sosSave);   //函数初始

    void getSosSaveV2(SOSSaveV2 sosSave);   //函数初始
    SOSSaveV2 getSosSQL(Integer devIdx);
    boolean saveSosSQL(SaveSosSQL saveSosSQL);
    boolean alterSosSaveUrl(AlterSOSSave sosSave);

    void getRTCAddRoom(RTCAddRoom rtcAddRoom);      //函数初始
    //查询房间
    Integer getRTCAddRoomID(RTCAddRoom rtcAddRoom);
    //加入WebRTC房间
    boolean getRTCAddRoomRecord(RTCAddRoom rtcAddRoom);
    boolean getRTCAddRoomRecord2(RTCAddRoom rtcAddRoom);
    //退出WebRTC房间
    boolean delRooId(RTCAddRoom rtcAddRoom);
    boolean getRTCDelRoomRecord(RTCAddRoom rtcAddRoom);


    VideoServer getVideoServerQry (@Param("id") int id);

    //token校验
    TokenData getToken(@Param("token") String token);

    List<GUsetDep> getUserDep(@Param("id")int devIdx);
    //重置设备录状态
    boolean refreshLoginDev();
    //重置用户登录状态
    boolean refreshLoginUser();

    //设备在线不做登录
    boolean isOnlineStatus(@Param("id")String device);
    //查询用户
    Users getuLogin(@Param("ulogin") String String);
    //修改用户在线属性
    boolean setuLoginName(AlterUsetInfo alterUsetInfo);
}
